package com.kyexpress.vms.enitity;

import com.intellij.openapi.components.PersistentStateComponent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.util.xmlb.XmlSerializerUtil;
import org.jetbrains.annotations.NotNull;

@State(name = "com.kyexpress.vms.enitity.MyConfig", storages = @Storage("MyConfig.xml"))
public class MyConfig implements PersistentStateComponent<MyConfig> {
    
    public static MyConfig getInstance() {
        // implementation according to Application/Project level service
        return ServiceManager.getService(MyConfig.class);
    }
    
    public String dict_host = "http://system-center.erp-debug.apps.ocp4.ky-tech.com.cn";
    public String package_name = "com.kyexpress.vms.storage.api.enums";
    public String module_name = "vms-storage-api";
    public String author = "pw";
    public String app_id = "";
    public String app_secret = "";
    public String dict_select = "";
    
    
    public MyConfig getState() {
        return this;
    }
    
    public void loadState(@NotNull MyConfig state) {
        XmlSerializerUtil.copyBean(state, this);
    }
}
